<?php

namespace app\components;

class JwtValidationData extends \sizeg\jwt\JwtValidationData
{

    /**
     * @inheritdoc
     */
    public function init()
    {
        $this->validationData->setIssuer(\Yii::$app->getRequest()->getHostInfo());
        $this->validationData->setAudience(isset($_SERVER['HTTP_ORIGIN']) ? $_SERVER['HTTP_ORIGIN'] : '');
        $this->validationData->setId(\Yii::$app->params['pas']);

        parent::init();
    }
}
